extends ColorRect

var progress:float:
	set(v):
		progress = clamp(progress,0,1)
		material.set_shader_parameter("progress",1.0-progress)
func _process(delta: float) -> void:
	if Global.player_velocity:rotation = rotate_toward(rotation,clamp(Global.player_velocity.x,-0.3,0.3),delta)
	else:rotation = rotate_toward(rotation,0,delta)
